Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the default cell marker #7782

Merged
merged 5 commits into from
Oct 7, 2019
Merged

Change the default cell marker #7782

merged 5 commits into from
Oct 7, 2019

Conversation

rchiodo
Copy link

@rchiodo rchiodo commented Oct 5, 2019

For #7674

@codecov-io
Copy link

codecov-io commented Oct 5, 2019

Codecov Report

Merging #7782 into master will decrease coverage by 0.01%.
The diff coverage is 26.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7782      +/-   ##
==========================================
- Coverage   59.17%   59.16%   -0.02%     
==========================================
  Files         498      498              
  Lines       22245    22254       +9     
  Branches     3573     3578       +5     
==========================================
+ Hits        13164    13166       +2     
- Misses       8259     8264       +5     
- Partials      822      824       +2
Impacted Files Coverage Δ
src/client/common/types.ts 100% <ø> (ø) ⬆️
.../datascience/interactive-common/interactiveBase.ts 6.25% <0%> (-0.02%) ⬇️
src/client/datascience/constants.ts 100% <100%> (ø) ⬆️
src/client/common/utils/localize.ts 93.95% <100%> (ø) ⬆️
...ient/datascience/editor-integration/codewatcher.ts 57.21% <12.5%> (-0.84%) ⬇️
src/client/datascience/jupyter/jupyterImporter.ts 18.42% <14.28%> (+0.85%) ⬆️
src/client/datascience/gather/gather.ts 65.45% <33.33%> (-2.47%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 218047c...635597a. Read the comment docs.

}

export namespace CodeSnippits {
export const ChangeDirectory = ['{0}', '{1}', 'import os', 'try:', '\tos.chdir(os.path.join(os.getcwd(), \'{2}\'))', '\tprint(os.getcwd())', 'except:', '\tpass', ''];
export const ChangeDirectoryCommentIdentifier = '# ms-python.python added'; // Not translated so can compare.
export const ImportIPython = '#%%\nfrom IPython import get_ipython\n\n';
export const ImportIPython = '{0}\nfrom IPython import get_ipython\n\n{1}';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there a second parameter here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this is used it's concatenated with another string.


In reply to: 331724874 [](ancestors = 331724874)

package.nls.json Outdated
@@ -218,7 +218,7 @@
"DataScience.exportingFormat": "Exporting {0}",
"DataScience.exportCancel": "Cancel",
"Common.canceled": "Canceled",
"DataScience.importChangeDirectoryComment": "#%% Change working directory from the workspace root to the ipynb file location. Turn this addition off with the DataScience.changeDirOnImportExport setting",
"DataScience.importChangeDirectoryComment": "# %% Change working directory from the workspace root to the ipynb file location. Turn this addition off with the DataScience.changeDirOnImportExport setting",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we remove this as well. I.e. if tomorrow a user wants the default to be #%%, it wont work everywhere as its hardcoded here.
I.e. use string.format as we've done in other places.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I'll fix that.


In reply to: 332123829 [](ancestors = 332123829)

package.nls.json Outdated
@@ -340,7 +340,7 @@
"DataScience.jupyterDebuggerInstallPtvsdYes": "Yes",
"DataScience.jupyterDebuggerInstallPtvsdNo": "No",
"DataScience.cellStopOnErrorFormatMessage": "{0} cells were canceled due to an error in the previous cell.",
"DataScience.instructionComments": "# To add a new cell, type '#%%'\n# To add a new markdown cell, type '#%% [markdown]'\n",
"DataScience.instructionComments": "# To add a new cell, type '# %%'\n# To add a new markdown cell, type '# %% [markdown]'\n",
Copy link

@DonJayamanne DonJayamanne Oct 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as earlier, string.format to not hardcode # %%

@rchiodo rchiodo merged commit 987b4de into master Oct 7, 2019
@rchiodo rchiodo deleted the rchiodo/default_cell_marker branch October 7, 2019 19:33
rchiodo added a commit that referenced this pull request Oct 10, 2019
* Change the default cell marker

* Fix test failures
Fix gather to use new comment
Fix formatting on code comments from nls

* Fix unit test too

* Fix gather to replace #%%
@lock lock bot locked as resolved and limited conversation to collaborators Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants